Skip to main content
Version: 4.0

Get Person Details by Code

Path
http://{supOS ip:port}/open-api/organization/v2/persons/{personCode}
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
{
"code": "zhangsan",
"name": "Zhangsan",
"valid": 1,
"gender": {
"code": "male",
"name": "Male"
},
"status": {
"code": "onWork",
"name": "On post"
},
"mainPosition": {
"code": "developPosition",
"name": "R&D"
},
"entryDate": "2021-05-28",
"title": {
"code": "primary",
"name": "Primary"
},
"qualification": "string",
"education": {
"code": "doctor",
"name": "Doctor"
},
"major": "IT",
"idNumber": "130971199809121011",
"departments": [
{
"name": "Tech department",
"code": "tecDept"
}
],
"companies": [
{
"name": "Tech company",
"code": "tecCom"
}
],
"user": {
"username": "zhangsan"
},
"positions": [
{
"name": "Tech post",
"code": "tecPos"
}
],
"modifyTime": "2021-01-26T16:02:15.666+0000"
}
  • 400
{
"code": 100104020,
"message": "specified person does not exist"
}

Get Company Details by Code

Path
http://{supOS ip:port}/open-api/organization/v2/companies/{companyCode}
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
{
"code": "developCompany",
"parentCode": "defualt_company",
"fullName": "Hangzhou R&D company",
"shortName": "R&D company",
"description": "A R&D company located in Hangzhou",
"tags": [
"develop",
"hangzhou"
],
"fullPath": "/group/R&D",
"layNo": 2,
"sort": 678.23,
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000"
}
  • 400
{
"code": 100104040,
"message": "company does not exist"
}

Get Persons by Company Code

Path
http://{supOS ip:port}/open-api/organization/v2/companies/{companyCode}/persons
Query parameter
  • current: Required integer. Current page number, starting from 1.
  • pageSize: Integer. Items on the page.
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
{
"list": [
{
"code": "zhangsan",
"name": "Zhangsan",
"valid": 1,
"gender": {
"code": "male",
"name": "Male"
},
"status": {
"code": "onWork",
"name": "On post"
},
"mainPosition": {
"code": "developPosition",
"name": "R&D"
},
"entryDate": "2021-05-28",
"title": {
"code": "primary",
"name": "Primary"
},
"qualification": "string",
"education": {
"code": "doctor",
"name": "Doctor"
},
"major": "IT",
"idNumber": "130971199809121011",
"departments": [
{
"name": "Tech department",
"code": "tecDept"
}
],
"companies": [
{
"name": "Tech company",
"code": "tecCom"
}
]
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
  • 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
  • 100000003: 'pageSize' cannot be smaller than 1!
  • 100000003: 'pageSize' cannot be larger than 500!
  • 100104040: Company does not exist.

Get Post Details by Code

Path
http://{supOS ip:port}/open-api/organization/v2/positions/{positionCode}
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
{
"parentCode": "technologyPosition",
"code": "developPosition",
"name": "R&D",
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000",
"department": {
"code": "tecDep",
"name": "Tech department"
},
"company": {
"code": "tecCompany",
"shortName": "Tech company",
"fullName": "Hangzhou R&D company"
},
"description": "R&D position in Hangzhou R&D company",
"fullPath": "/tech post/R&D",
"layNo": 2,
"sort": 678.23,
"roles": [
{
"name": "system admin",
"code": "systemRole"
}
]
}
  • 400
{
"code": 100104013,
"message": "specified post does not exist"
}
    • 100000003: pageSize cannot be smaller than 1!
    • 100000003: pageSize cannot be larger than 500!
    • 100104040: Company does not exist.

Get Persons by Post

Path
http://{supOS ip:port}/open-api/organization/v2/positions/{positionCode}/persons
Query parameter
  • current: Required integer. Current page number, starting from 1.
  • pageSize: Integer. Items on the page.
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
{
"list": [
{
"code": "zhangsan",
"name": "Zhangsan",
"valid": 1,
"gender": {
"code": "male",
"name": "Male"
},
"status": {
"code": "onWork",
"name": "On post"
},
"mainPosition": {
"code": "developPosition",
"name": "R&D"
},
"entryDate": "2021-05-28",
"title": {
"code": "primary",
"name": "Primary"
},
"qualification": "string",
"education": {
"code": "doctor",
"name": "Doctor"
},
"major": "IT",
"idNumber": "130971199809121011",
"departments": [
{
"name": "Tech department",
"code": "tecDept"
}
],
"companies": [
{
"name": "Tech company",
"code": "tecCom"
}
]
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
  • 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
    • 100000003: 'pageSize' cannot be smaller than 1!
    • 100000003: 'pageSize' cannot be larger than 500!
    • 100104013: Specified post does not exist.

Get Department Details by Code

Path
http://{supOS ip:port}/open-api/organization/v2/departments/{departmentCode}
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
{
"parentCode": "technologyDepartment",
"code": "developDepartment",
"name": "R&D",
"deptType": {
"code": "general",
"name": "General"
},
"description": "R&D department in Hangzhou R&D company",
"fullPath": "/tech department/R&D",
"layNo": 2,
"sort": 678.23,
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000",
"company": {
"code": "tecCompany",
"shortName": "R&D company",
"fullName": "Hangzhou R&D company"
},
"managers": [
{
"name": "Lisi",
"code": "lisi"
}
],
"positions": [
{
"name": "developPosition",
"code": "R&D postistion"
}
]
}
  • 400
{
"code": 100104004,
"message": "specified department does not exist"
}

Get Persons by Department

Path
http://{supOS ip:port}/open-api/organization/v2/departments/{departmentCode}/persons
Query parameter
  • current: Required integer. Current page number, starting from 1.
  • pageSize: Integer. Items on the page.
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
{
"list": [
{
"code": "zhangsan",
"name": "Zhangsan",
"valid": 1,
"gender": {
"code": "male",
"name": "Male"
},
"status": {
"code": "onWork",
"name": "On post"
},
"mainPosition": {
"code": "developPosition",
"name": "R&D"
},
"entryDate": "2021-05-28",
"title": {
"code": "primary",
"name": "Primary"
},
"qualification": "string",
"education": {
"code": "doctor",
"name": "Doctor"
},
"major": "IT",
"idNumber": "130971199809121011",
"departments": [
{
"name": "Tech department",
"code": "tecDept"
}
],
"companies": [
{
"name": "Tech company",
"code": "tecCom"
}
]
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
  • 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
    • 100000003: 'pageSize' cannot be smaller than 1!
    • 100000003: 'pageSize' cannot be larger than 500!
    • 100104004: Specified department does not exist.

Get Company List

Path
http://{supOS ip:port}/open-api/organization/v2/companies
Query parameter
  • current: Required integer. Current page number, starting from 1.
  • pageSize: Integer. Items on the page.
  • modifyTime: The lastest modify time. Format is yyyy-MM-dd'T'HH:mm:ss.SSSZ.
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
{
"list": [
{
"code": "developCompany",
"parentCode": "defualt_company",
"fullName": "Hangzhou R&D company",
"shortName": "R&D company",
"description": "A R&D company located in Hangzhou",
"tags": [
"develop",
"hangzhou"
],
"fullPath": "/group/R&D",
"layNo": 2,
"sort": 678.23,
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000"
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
  • 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
    • 100000003: 'pageSize' cannot be smaller than 1!
    • 100000003: 'pageSize' cannot be larger than 500!
    • 1001040377: Date format error.

Get Department List

Path
http://{supOS ip:port}/open-api/organization/v2/departments
Query parameter
  • current: Required integer. Current page number, starting from 1.
  • pageSize: Integer. Items on the page.
  • modifyTime: The lastest modify time. Format is yyyy-MM-dd'T'HH:mm:ss.SSSZ.
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
{
"list": [
{
"parentCode": "technologyDepartment",
"code": "developDepartment",
"name": "R&D",
"deptType": {
"code": "general",
"name": "General"
},
"description": "R&D department in Hangzhou R&D company",
"fullPath": "/tech department/R&D",
"layNo": 2,
"sort": 678.23,
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000",
"company": {
"code": "tecCompany",
"shortName": "R&D company",
"fullName": "Hangzhou R&D company"
},
"managers": [
{
"name": "Lisi",
"code": "lisi"
}
]
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
  • 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
    • 100000003: 'pageSize' cannot be smaller than 1!
    • 100000003: 'pageSize' cannot be larger than 500!
    • 1001040377: Date format error.

Get Post List

Path
http://{supOS ip:port}/open-api/organization/v2/positions
Query parameter
  • current: Required integer. Current page number, starting from 1.
  • pageSize: Integer. Items on the page.
  • modifyTime: The lastest modify time. Format is yyyy-MM-dd'T'HH:mm:ss.SSSZ.
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
{
"list": [
{
"parentCode": "technologyPosition",
"code": "developPosition",
"name": "R&D",
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000",
"department": {
"code": "tecDep",
"name": "Tech department"
},
"company": {
"code": "tecCompany",
"shortName": "R&D company",
"fullName": "Hangzhou R&D company"
},
"description": "R&D post in Hangzhou R&D company",
"fullPath": "/tech position/R&D",
"layNo": 2,
"sort": 678.23
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
  • 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
    • 100000003: 'pageSize' cannot be smaller than 1!
    • 100000003: 'pageSize' cannot be larger than 500!
    • 1001040377: Date format error.

Get Person List

Path
http://{supOS ip:port}/open-api/organization/v2/persons
Query parameter
  • current: Required integer. Current page number, starting from 1.
  • pageSize: Integer. Items on the page.
  • modifyTime: The lastest modify time. Format is yyyy-MM-dd'T'HH:mm:ss.SSSZ.
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
{
"list": [
{
"code": "zhangsan",
"name": "Zhangsan",
"valid": 1,
"gender": {
"code": "male",
"name": "Male"
},
"status": {
"code": "onWork",
"name": "On post"
},
"mainPosition": {
"code": "developPosition",
"name": "R&D"
},
"entryDate": "2021-05-28",
"title": {
"code": "primary",
"name": "Primary"
},
"qualification": "string",
"education": {
"code": "doctor",
"name": "Doctor"
},
"major": "IT",
"idNumber": "130971199809121011",
"departments": [
{
"name": "Tech department",
"code": "tecDept"
}
],
"companies": [
{
"name": "Tech company",
"code": "tecCom"
}
],
"user": {
"username": "zhangsan"
},
"positions": [
{
"name": "Tech post",
"code": "tecPos"
}
],
"modifyTime": "2021-01-26T16:02:15.666+0000"
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
  • 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
    • 100000003: 'pageSize' cannot be smaller than 1!
    • 100000003: 'pageSize' cannot be larger than 500!
    • 1001040377: Date format error.

Get Department List by Company

Path
http://{supOS ip:port}/open-api/organization/v2/companies/{companyCode}/departments
Query parameter
  • username: When it is not empty, departments the user is linked with are returned.
  • current: Required integer. Current page number, starting from 1.
  • pageSize: Integer. Items on the page.
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
{
"list": [
{
"parentCode": "technologyDepartment",
"code": "developDepartment",
"name": "R&D",
"deptType": {
"code": "general",
"name": "General"
},
"description": "R&D department in Hangzhou R&D company",
"fullPath": "/tech department/R&D",
"layNo": 2,
"sort": 678.23,
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000",
"company": {
"code": "tecCompany",
"shortName": "R&D company",
"fullName": "Hangzhou R&D company"
},
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
  • 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
    • 100000003: 'pageSize' cannot be smaller than 1!
    • 100000003: 'pageSize' cannot be larger than 500!
    • 100104040: Company does not exist.
    • 100104050: User does not exist under the company.

Get Post List by Company

Path
http://{supOS ip:port}/open-api/organization/v2/companies/{companyCode}/positions
Query parameter
  • current: Required integer. Current page number, starting from 1.
  • pageSize: Integer. Items on the page.
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
{
"list": [
{
"parentCode": "technologyPosition",
"code": "developPosition",
"name": "R&D",
"department": {
"code": "developDept",
"name": "R&D department"
},
"valid": 1,
"company": {
"code": "tecCompany",
"shortName": "R&D company",
"fullName": "Hangzhou R&D company"
},
"fullPath": "/tech position/R&D"
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
  • 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
    • 100000003: 'pageSize' cannot be smaller than 1!
    • 100000003: 'pageSize' cannot be larger than 500!
    • 100104040: Company does not exist.

Add, Edit and Delete Person in Batches

Path
http://{supOS ip:port}/open-api/organization/v2/persons/bulk
Request body
{
"addPersons": [
{
"code": "zhaoyi", //required
"name": "Zhaoyi", //required
"phone": 15219809782,
"gender": "male", //required
"status": "onWork", //required
"email": "zhaoyi@163.com",
"description": "My name is Zhaoyi",
"directLeaderCode": "dbManager",
"grandLeaderCode": "depManager",
"entryDate": "2021-01-26",
"title": "elementary",
"qualification": null,
"education": "middleOrOther",
"major": "IT",
"idNumber": 130971199809121010,
"mainPositionCode": "developPosition" //required
},
{
"code": "qianer",
"name": "Qianer",
"phone": null,
"gender": "male",
"status": "onWork",
"email": null,
"description": null,
"directLeaderCode": null,
"grandLeaderCode": null,
"entryDate": null,
"title": null,
"qualification": null,
"education": null,
"major": null,
"idNumber": null,
"mainPositionCode": "developPosition"
}
],
"updatePersons": [
{
"code": "sunsan", //required
"name": "Sunsan", //required
"phone": 13738374659,
"gender": "male", //required
"status": "onWork", //required
"email": "sunsan@163.com",
"description": "Sunsan is a R&D engineer",
"directLeaderCode": "dbManager",
"grandLeaderCode": "depManager",
"entryDate": "2021-05-26",
"title": "intermediate",
"qualification": null,
"education": "hd",
"major": "Computer information",
"idNumber": 189746287423231,
"mainPositionCode": "developPosition" //required
},
{
"code": "lisi",
"name": "Lisi",
"phone": null,
"gender": "male",
"status": "onWork",
"email": null,
"description": null,
"directLeaderCode": null,
"grandLeaderCode": null,
"entryDate": null,
"title": null,
"qualification": null,
"education": null,
"major": null,
"idNumber": null,
"mainPositionCode": "developPosition"
}
],
"deletePersons": [
"wangwu",
"zhaoliu"
]
}
info
  • gender: System code is sys_gender: male/female.
  • status: System code is sys_person_status: onWork/offWork.
  • title: System code is sys_title: elementary/intermidiate/advanced.
  • education: System code is sys_education: middleOrOther/highSecondary/degree/college/master/phd.
Header parameter

Accept-Language: Default is the server language. Options are en-us and zh-cn.

Response
  • 200: Successful.
  • 400
{
"code": 1001040393,
"message": "person code is required, cannot be empty. It must a combination of letter, number and underscore, with length less than 50."
}
Error TypeError CodeMessage
Common errors for personnel addition and modification1001040393Person code is required, cannot be empty, and must be a combination of letters, numbers, and underscores, with a length not exceeding 50!
1001040394Person name is required, cannot be empty, and must be no more than 200 characters in length!
1001040395Person gender is required and cannot be empty!
1001040396Person status is required and cannot be empty!
1001040397Main position is required and cannot be empty!
1001040398Description cannot be more than 500 characters in length!
1001040399ID card number is composed of numbers, uppercase and lowercase letters, and special characters, with a length not exceeding 200 characters!
1001040400ID card number cannot be duplicated!
1001040385Direct leader does not exist!
1001040386Grand leader does not exist!
1001040389Gender system code is incorrect!
1001040390Person status system code is incorrect!
1001040391Title system code is incorrect!
1001040392Education system code is incorrect!
100104019The specified position does not exist!
Unique errors for personnel addition100104021Person number already exists!
1001040384Duplicate person codes!
Specific errors for personnel modification100104020The specified person does not exist!
Specific errors for personnel deletion1001040376Failed to delete user!

Set Person Icon by Code

Path
http://{supOS ip:port}/open-api/organization/v2/persons/{personCode}/image
Query parameter

imageType: Required string. For example: imageType=avatar.

Request body

fileName

Response
  • 200: Successful.
  • 400
{
"code": 1001040379,
"message": "person icon format error"
}
    • 1001040387: 'imageType' error.
    • 100104020: Specified person does not exist.